# Copyright (c) 2018 Presto Labs Pte. Ltd.
# Author: jaewon

from coin.exchange.binance.ws.subscriber import BinanceSubscriber
from coin.strategy.mm.feed_builder import (
    BinanceFlowBookBuilder,
    Binance1sFlowBookBuilder,
    BinanceSnapshotL1RealtimeFlowBookBuilder,
)
from coin.strategy.mm.subscription import SubscriptionRequest
from coin.strategy.mm.base.feed import BaseFeedSubsystem


class BinanceFeedSubsystem(BaseFeedSubsystem):
  FeedSubReq = SubscriptionRequest('Spot', 'Binance', None)
  FeedSubscriber = BinanceSubscriber
  FlowBookBuilder = BinanceFlowBookBuilder


class Binance1sFeedSubsystem(BaseFeedSubsystem):
  FeedSubReq = SubscriptionRequest('Spot', 'Binance', 'update_1s')
  FeedSubscriber = BinanceSubscriber
  FlowBookBuilder = Binance1sFlowBookBuilder


class BinanceSnapshotL1RealtimeFeedSubsystem(BaseFeedSubsystem):
  FeedSubReq = SubscriptionRequest('Spot', 'Binance', 'l1_realtime')
  FeedSubscriber = BinanceSubscriber
  FlowBookBuilder = BinanceSnapshotL1RealtimeFlowBookBuilder
